package com.hao.tool.util.component.interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * Created by haol on 2017/3/15.
 */
@Configuration
public class InterceptorConfiguration implements WebMvcConfigurer {


    public void addInterceptors(InterceptorRegistry registry) {

        InterceptorRegistration inter_web = registry.addInterceptor(new WebInterceptor());
        inter_web.addPathPatterns("/**");
        inter_web.excludePathPatterns("/rest/base/login");
        inter_web.excludePathPatterns("/login");
        inter_web.excludePathPatterns("/static/**");


    }
}
